<?php

namespace Home\Controller;

class NewsController extends CommonController {

    public function getNews() {
        // $News = M('News');
        // $news = $News->order('id DESC')->select();

        return $this->ajaxReturn($this->buildResult(true, 'getNews 成功',
            array(
                array(
                    'title' => '便便健康指南',
                    'cover' => 'http://ww2.sinaimg.cn/mw690/005tGYqIgw1ehu5q8uupxj30qo2bcnpd.jpg',
                    'content' => 'http://jandan.net/2014/06/28/poop-health.html',
                    'created_at' => '2014-11-20'
                ),
                array(
                    'title' => '信息图：大便里都有什么？',
                    'content' => 'http://jandan.net/2013/03/04/ask-about-poop.html',
                    'cover' => 'http://tankr.net/s/medium/8558.jpg',
                    'created_at' => '2014-11-19'
                ),
                array(
                    'title' => '关于便便的一些真相',
                    'cover' => 'http://tankr.net/s/medium/EXFG.jpg',
                    'content' => 'http://jandan.net/2010/02/13/the-facts-about-poop.html',
                    'created_at' => '2014-11-19'
                ),
                array(
                    'title' => '如何拉出健康的便便',
                    'cover' => 'http://tankr.net/s/medium/RDTY.jpg',
                    'content' => 'http://jandan.net/2014/08/24/healthy-poop-shape.html',
                    'created_at' => '2014-11-19'
                ),
                array(
                    'title' => '关于《一泡屎的深度分析》',
                    'cover' => 'http://tankr.net/s/medium/EKZX.jpg',
                    'content' => 'http://jandan.net/2013/01/05/piece-of-shit.html',
                    'created_at' => '2014-11-18'
                )
            )
        ));

        // return $this->ajaxReturn($this->buildResult(true, 'getNews 成功', $news));
    }
}
